<div class="home_page thuvien">
			<div class="bg_thuvien">
				<div id="header">
					<div class="ribbon"><img src="<?php echo PATH_URL.'static/images/img_ribbon.png' ?>" alt="" /></div>
					<div class="menu">
        					<ul>
        						<li><a href="#" class="menu_trangchu"></a></li>
        						<li><a href="<?=PATH_URL.'tham-gia'?>"class="menu_thamgia"></a></li>
        						<li><a href="<?=PATH_URL.'thu-vien'?>"class="menu_thuvien"></a></li>
        						<li><a href="<?=PATH_URL.'the-le'?>" class="menu_thele"></a></li>
        						<li class="last"><a href="http://davitabone.vn/" class="menu_davita" target="_blank"></a></li>
        					</ul>
        				</div>
				</div>
				<div class="content_thuvien">
					<div class="content_main">
						<div class="title_select">
							<div><img src="<?php echo PATH_URL.'static/images/img_heart_1.png'?>" alt="" />Thư viện</div>
							<div class="border"></div>
							<div class="select">
								<span style="float: left; margin-right: 5px;">xem theo</span>
                                <form action="" method="get" enctype="multipart/form-data" style="width: 148px; float: left;">
								<select name="o" class="listbainhanh-select">
									<option value="bai-moi-nhat" <?=($this->input->get('o')=='bai-moi-nhat')?'selected':''?>>Bài mới nhất</option>
                                   	<option value="bai-du-thi-tuan-1" <?=($this->input->get('o')=='bai-du-thi-tuan-1')?'selected':''?>>Bài dự thi tuần 1</option>
                                    <option value="bai-du-thi-tuan-2" <?=($this->input->get('o')=='bai-du-thi-tuan-2')?'selected':''?>>Bài dự thi tuần 2</option>
					                <option value="bai-du-thi-tuan-3" <?=($this->input->get('o')=='bai-du-thi-tuan-3')?'selected':''?>>Bài dự thi tuần 3</option>
					
								</select>
                                </form>
                                <div style="clear: both;"></div>
							</div>
						</div>
						<div class="list_video">
                          <?php 
                            if(!empty($result))
                            {
            			         foreach($result AS $r)
               					    {				
                            ?>
                            <div class="item left">
								<div class="img"><a href="<?=PATH_URL.'thu-vien/chi-tiet/'.$r->id?>">
                                <?php if($r->type == 1){ ?>
                                      <?php if($r->link != ""){ ?>
                                     <img src="<?php echo PATH_URL.'static/images/tim/timthumb.php?src='.PATH_URL.DIR_CONTEST_PHOTO.$r->link.'&w=194&h=100&zc=1&q=100' ?>" />
                                    <?php }else{ ?>
                                        <img src="<?php echo PATH_URL.'static/images/tim/timthumb.php?src='.PATH_URL.'static/images/default.png'.'&w=194&h=100&zc=1&q=100' ?>" />
                                    <?php } ?>
                                <?php }else{ ?>
                                      <span class="icon_play"></span>
                                     <img src="<?php echo PATH_URL.'static/images/tim/timthumb.php?src='.PATH_URL.'static/images/default.png'.'&w=194&h=100&zc=1&q=100' ?>" alt="" />
                                <?php }?>
                               
                               </a></div>
								<div class="mt5">
									<div class="left"><?=$r->like?> <img src="<?php echo PATH_URL.'static/images/img_heart_2.png'?>" alt="" /> Like</div>
									<div class="right txt_r"><?=$r->comment?>  Comments <img src="<?php echo PATH_URL.'static/images/img_comment.png'?>" alt="" /></div>
									<div class="clear"></div>
								</div>
								<div class="user mt5">Đăng bởi <a href="<?=PATH_URL.'thu-vien/chi-tiet/'.$r->id?>"><?=CutText($r->fullname,15) ?></a></div>
							</div>
                            
                            <?php }}?>
							
							
						
							<div class="clear"></div>
						</div>
						<div class="pagination">
                        <?=$pagination?>
                        </div>
						
						<div class="jcarousel-wrapper">
							<div class="jcarousel">
								<ul>
									<li><img src="<?php echo PATH_URL.'static/images/img_slide.png'?>" alt="Image 1"></li>
									<li><img src="<?php echo PATH_URL.'static/images//img_slide.png'?>" alt="Image 2"></li>
									<li><img src="<?php echo PATH_URL.'static/images/img_slide.png'?>" alt="Image 3"></li>
									<li><img src="<?php echo PATH_URL.'static/images/img_slide.png'?>" alt="Image 4"></li>
									<li><img src="<?php echo PATH_URL.'static/images/img_slide.png'?>" alt="Image 5"></li>
								</ul>
							</div>
							<a href="JavaScript:void(0);" class="jcarousel-control-prev"><img src="<?php echo PATH_URL.'static/images/btn_prev.png'?>" alt="" /></a>
							<a href="JavaScript:void(0);" class="jcarousel-control-next"><img src="<?php echo PATH_URL.'static/images/btn_next.png'?>" alt="" /></a>
						</div>
						
					</div>
				</div>
			</div>
		</div>
        <div id="footer"><a href="http://davitabone.vn/" target="_blank" class="logo"><img src="<?php echo PATH_URL.'static/images/img_footer.jpg'?>" alt="" /></a></div>